home *** CD-ROM | disk | FTP | other *** search
/ SGI Desktop Special Edition 1.1 / SGI Desktop Special Edition 1.1.iso / dist / mmail.idb / usr / lib / Zmail / custom.zmailrc.z / custom.zmailrc
Encoding:
Text File  |  1995-11-13  |  3.1 KB  |  99 lines

  1. function startup_hook() {
  2.     if $?MAIL
  3.         set __smf=$MAIL
  4.     else
  5.         if $?mail
  6.             set __smf=$mail
  7.         else
  8.             set __smf=/var/mail/$user
  9.         endif
  10.     endif
  11.  
  12.     if ! -e $__smf
  13.         if $user != "root"
  14.             if $user != "guest"
  15.                 set __mfletter=$ZMLIB/doc/.mfletter
  16.                 if -e $__mfletter
  17.                     mail -U -H $__mfletter -s "Creating mail folder..." $user
  18.                     opensmf
  19.                 endif
  20.             endif
  21.         endif
  22.     endif
  23.  
  24.     if $?saved_by_version
  25.         if "$saved_by_version" != "$version"
  26.             set verify += split_send
  27.  
  28.             if -e $HOME/.forward
  29.                 echo -d -h 'The version of MediaMail you have just installed enables the receiving of very\nlarge messages that have been split into pieces small enough for most mail\nsystems to handle. To use this new functionality, you must modify the\n.forward file in your home directory. Please refer to the online help section\non "MediaMail and Your .forward File" for modification instructions.'
  30.             endif
  31.         endif
  32.     endif
  33.  
  34.     if $?dot_forward
  35.         if ! -e $HOME/.forward
  36.             ask -m 'In order to be able to reassemble very large messages that could be sent in\npieces to you, a .forward file must be created and placed in your home\ndirectory.\n\nChoose Yes below to create the .forward file and therefore be able to\nreassemble very large, split messages.\n\nChoose No to continue without creating a .forward file. Very large, split\nmessages may appear in your mailbox in pieces and will not be reassembled.\n\nTo inhibit this dialog, choose Variables from the Options menu of the MediaMail\nwindow and unset the dot_forward variable. For more information on setting\nup a .forward file, refer to the Help section on "MediaMail and the .forward file".'
  37.             if $status == 0
  38.                 sh "echo '|/usr/lib/Zmail/bin/reassembler' > $HOME/.forward"
  39.                 sh "chmod 644 $HOME/.forward"
  40.             endif
  41.         endif
  42.     endif
  43.  
  44.     zmenu_set_tmpdir
  45.     foreach pending ( /var/mail/$user.partials/* ) 'check_partials $pending'
  46.  
  47.     if -e $HOME/.vacation_set
  48.         echo -d "Reminder: Vacation program is still set"
  49.     endif
  50. }
  51.     
  52. function opensmf() {
  53.     if $?recursive
  54.         set __recursive = "$recursive"
  55.     else
  56.         set recursive
  57.         unset __recursive
  58.     endif
  59.     
  60.     set __sleep_counter = 0
  61.     ropensmf
  62.     
  63.     if $?__recursive
  64.         set recursive = "$__recursive"
  65.     else
  66.         unset recursive
  67.     endif
  68. }
  69.     
  70. function ropensmf() {
  71.     if -e $__smf
  72.         open %
  73.     else
  74.         sh sleep 1
  75.         arith __sleep_counter = "$__sleep_counter" + 1
  76.         if $__sleep_counter < 20
  77.             ropensmf
  78.         endif
  79.     endif
  80. }
  81.  
  82. function check_partials() {
  83.     set __output=$__tmpdir/check-$$
  84.     remove -f $__output
  85.     
  86.     sh "$ZMLIB/bin/check-partials $1 > $__output"
  87.  
  88.     if ! -z $__output
  89.     page $__output
  90.     endif
  91.  
  92.     remove -f $__output
  93. }
  94.  
  95. function reassemble() {
  96.     foreach m `pick -h content-type message/partial` \
  97.         'pipe $m /usr/lib/Zmail/bin/reassembler ; delete $m'
  98. }
  99.